package com.njwb.day15.zqzb.ios.exec;

import com.njwb.day15.zqzb.ios.pojo.Pet;
import com.njwb.day15.zqzb.ios.util.Util;

public class PetRw {
    public static void main(String[] args) {
        Pet pet = new Pet();
        pet.setName("特朗普");
        pet.setType("藏獒");
        pet.setMasterName("熊猫");




        //读=》字符串
        String data = Util.readFile("chapter02/src/pet.template");
        //==> 处理
        data = data.replace("{name}",pet.getName()).replace("{type}",pet.getType()).replace("{master}",pet.getMasterName());


        Util.writeTargetDataIntoFile(data,"chapter02/src/pet_new.txt");



    }
}
